<?php

    require_once("config/config.php");
    session_start();
    $_SESSION['db'] = $db;
    $_SESSION['site_name'] = $site_name;

?>

<html>
    <head>
        <meta name="viewport" content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
        <link rel="shortcut icon" href="/favicon.ico" >
	    <link rel="stylesheet" href="//cdnjs.loli.net/ajax/libs/mdui/0.4.3/css/mdui.min.css">
        <script src="//cdnjs.loli.net/ajax/libs/mdui/0.4.3/js/mdui.min.js"></script>
        <title><?php echo($site_name); ?></title>
        <link rel="stylesheet" href="/static/nprogress/nprogress.css">
        <link rel="stylesheet" href="all-a.css">
    </head>
    <style>
        body{
            background:url('https://www.toptal.com/designers/subtlepatterns/patterns/repeated-square.png');
        }
	    .beauty_mdui{
	        padding-left: 5%;
	        padding-right: 5%;
	    };
	    .footer{
	        margin-bottom: 50px;
	    }
	    .Copyright{
	        width: 100%;
            text-align: center;
            position: fixed;
            bottom: 1rem;
	    }
	</style>
	<body class="mdui-appbar-with-toolbar mdui-theme-primary-green mdui-theme-accent-pink mdui-loaded" id="admin_page">
	    <div class="mdui-appbar">
    	    <header class="mdui-appbar mdui-appbar-fixed">
                <div class="mdui-toolbar mdui-color-theme">
                    <span class="mdui-btn mdui-btn-icon mdui-ripple mdui-ripple-white" mdui-drawer="{target: '#main-drawer'}">
                        <i class="mdui-icon material-icons">menu</i>
                    </span>
                    <a href="" class="mdui-typo-title"><?php echo($site_name) ?></a>
                </div>
            </header>
            <div class="mdui-drawer mdui-drawer-close" id="main-drawer">
                <div class="mdui-list" mdui-collapse="{accordion: true}" style="margin-bottom: 68px;">
                    <div class="mdui-list">
                        <a href="javascript:void(0)" onclick="go_index()" class="mdui-list-item">
                            <svg t="1583228627506" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1039" width="32" height="32"><path d="M853.333333 368.533333v390.229334c0 36.565333-28.650667 66.218667-64 66.218666H213.333333c-35.349333 0-64-29.653333-64-66.218666V368.533333h704z m-106.666666 44.16H256v263.04h490.666667v-263.04z m-64 66.474667v132.864H320v-132.864h362.666667zM789.333333 192c35.349333 0 64 29.653333 64 66.197333v44.138667H149.333333v-44.138667C149.333333 221.653333 177.984 192 213.333333 192h576z" p-id="1040" fill="#8a8a8a"></path></svg>
                            <div class="mdui-list-item-content">
                                <center>主页</center>
                            </div>
                        </a>
                    </div>
                    <div class="mdui-list">
                        <a href="javascript:void(0)" onclick="go_back_domain()" class="mdui-list-item">
                            <svg t="1583329014725" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2565" width="32" height="32"><path d="M290.0992 409.6H155.136a371.4048 371.4048 0 0 0-14.2848 102.4c0 35.5328 4.9664 69.888 14.336 102.4h134.9632c-5.632-32.768-8.4992-66.9184-8.4992-102.4 0-35.4816 2.8672-69.632 8.4992-102.4z m52.0704 0a542.1056 542.1056 0 0 0-9.3696 102.4c0 35.7376 3.072 69.888 9.3696 102.4H486.4V409.6H342.1696z m75.008 461.3632A491.8784 491.8784 0 0 1 301.568 665.6H173.9776a372.0704 372.0704 0 0 0 243.2 205.3632z m69.2224-3.584V665.6H354.9696c24.064 77.1072 67.84 144.2304 131.4304 201.8304zM417.1776 153.088A372.0704 372.0704 0 0 0 173.9776 358.4H301.568a491.8784 491.8784 0 0 1 115.5584-205.3632z m69.2224 3.584C422.8096 214.1184 379.0848 281.2416 354.9696 358.4H486.4V156.5696zM733.9008 409.6c5.632 32.768 8.4992 66.9184 8.4992 102.4 0 35.4816-2.8672 69.632-8.4992 102.4h135.0144c9.3184-32.512 14.2848-66.8672 14.2848-102.4s-4.9664-69.888-14.336-102.4h-134.9632z m-52.0704 0H537.6v204.8h144.2304c6.2464-32.512 9.3696-66.6624 9.3696-102.4s-3.072-69.888-9.3696-102.4z m-75.008 461.3632A372.0704 372.0704 0 0 0 850.0224 665.6H722.432a491.8784 491.8784 0 0 1-115.5584 205.3632z m-69.2224-3.584c63.5904-57.5488 107.3152-124.672 131.4304-201.7792H537.6v201.8304zM606.8224 153.088A491.8784 491.8784 0 0 1 722.432 358.4h127.6416a372.0704 372.0704 0 0 0-243.2-205.3632z m-69.2224 3.584V358.4h131.4304c-24.064-77.1072-67.84-144.2304-131.4304-201.8304zM512 947.2a435.2 435.2 0 1 1 0-870.4 435.2 435.2 0 0 1 0 870.4z" fill="#5A5A68" p-id="2566"></path></svg>
                            <div class="mdui-list-item-content">
                                <center>短域反查</center>
                            </div>
                        </a>
                    </div>
                    <div class="mdui-list">
                        <a href="javascript:void(0)" onclick="long_to_short()" class="mdui-list-item">
                            <svg t="1583329014725" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2565" width="32" height="32"><path d="M290.0992 409.6H155.136a371.4048 371.4048 0 0 0-14.2848 102.4c0 35.5328 4.9664 69.888 14.336 102.4h134.9632c-5.632-32.768-8.4992-66.9184-8.4992-102.4 0-35.4816 2.8672-69.632 8.4992-102.4z m52.0704 0a542.1056 542.1056 0 0 0-9.3696 102.4c0 35.7376 3.072 69.888 9.3696 102.4H486.4V409.6H342.1696z m75.008 461.3632A491.8784 491.8784 0 0 1 301.568 665.6H173.9776a372.0704 372.0704 0 0 0 243.2 205.3632z m69.2224-3.584V665.6H354.9696c24.064 77.1072 67.84 144.2304 131.4304 201.8304zM417.1776 153.088A372.0704 372.0704 0 0 0 173.9776 358.4H301.568a491.8784 491.8784 0 0 1 115.5584-205.3632z m69.2224 3.584C422.8096 214.1184 379.0848 281.2416 354.9696 358.4H486.4V156.5696zM733.9008 409.6c5.632 32.768 8.4992 66.9184 8.4992 102.4 0 35.4816-2.8672 69.632-8.4992 102.4h135.0144c9.3184-32.512 14.2848-66.8672 14.2848-102.4s-4.9664-69.888-14.336-102.4h-134.9632z m-52.0704 0H537.6v204.8h144.2304c6.2464-32.512 9.3696-66.6624 9.3696-102.4s-3.072-69.888-9.3696-102.4z m-75.008 461.3632A372.0704 372.0704 0 0 0 850.0224 665.6H722.432a491.8784 491.8784 0 0 1-115.5584 205.3632z m-69.2224-3.584c63.5904-57.5488 107.3152-124.672 131.4304-201.7792H537.6v201.8304zM606.8224 153.088A491.8784 491.8784 0 0 1 722.432 358.4h127.6416a372.0704 372.0704 0 0 0-243.2-205.3632z m-69.2224 3.584V358.4h131.4304c-24.064-77.1072-67.84-144.2304-131.4304-201.8304zM512 947.2a435.2 435.2 0 1 1 0-870.4 435.2 435.2 0 0 1 0 870.4z" fill="#5A5A68" p-id="2566"></path></svg>
                            <div class="mdui-list-item-content">
                                <center>长域反查</center>
                            </div>
                        </a>
                    </div>
                    <div class="mdui-list">
                        <a href="javascript:void(0)" onclick="go_admin()" class="mdui-list-item">
                            <svg t="1583243600289" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7149" width="32" height="32"><path d="M669.696 584.618667a20.821333 20.821333 0 0 0-27.093333 11.392 156.288 156.288 0 0 1-145.493334 96.853333c-86.442667 0-156.842667-69.504-156.842666-154.965333 0-31.061333 9.216-61.013333 26.709333-86.570667a157.184 157.184 0 0 1 130.133333-68.48c52.224 0 100.864 25.6 130.133334 68.352 6.058667 9.002667 11.264 18.602667 15.36 28.501333a20.906667 20.906667 0 0 0 27.093333 11.349334 20.693333 20.693333 0 0 0 11.392-27.050667A198.869333 198.869333 0 0 0 497.066667 341.333333a198.826667 198.826667 0 0 0-164.565334 86.656A194.261333 194.261333 0 0 0 298.666667 537.898667c0 108.330667 89.045333 196.522667 198.442666 196.522666a197.674667 197.674667 0 0 0 184.021334-122.794666 20.693333 20.693333 0 0 0-11.434667-27.008" p-id="7150"></path><path d="M765.226667 577.109333a18.816 18.816 0 0 0-10.410667 7.978667 18.346667 18.346667 0 0 0-4.053333 7.68c-6.826667 29.44-18.773333 57.258667-35.370667 82.773333a18.773333 18.773333 0 0 0 1.28 22.058667l27.306667 47.104-41.002667 41.002667-49.109333-28.288a18.773333 18.773333 0 0 0-14.634667-1.749334 18.474667 18.474667 0 0 0-9.386667 2.389334 264.192 264.192 0 0 1-78.933333 31.402666 19.114667 19.114667 0 0 0-16.128 13.866667l-14.634667 54.613333h-58.026666l-14.72-55.082666a18.944 18.944 0 0 0-16.298667-13.866667c-0.128 0-0.170667-0.085333-0.256-0.128a265.173333 265.173333 0 0 1-81.664-34.474667c-1.109333-0.682667-2.346667-0.896-3.498667-1.322666-0.725333-0.298667-1.365333-0.64-2.133333-0.853334a18.346667 18.346667 0 0 0-6.058667-0.426666l-0.853333 0.042666a18.688 18.688 0 0 0-9.045333 3.541334l-46.933334 27.093333-41.130666-41.002667 28.672-49.408a18.773333 18.773333 0 0 0-2.304-21.888c-0.170667-0.256-0.170667-0.512-0.298667-0.810666a258.432 258.432 0 0 1-31.488-76.586667c-0.213333-0.981333-0.853333-1.664-1.152-2.56a18.688 18.688 0 0 0-13.013333-13.184l-53.930667-14.634667v-58.112l53.930667-14.634666a18.944 18.944 0 0 0 13.866666-16.256c0.128-0.426667 0.554667-0.597333 0.64-1.066667 6.826667-28.245333 18.261333-55.04 34.005334-79.616 0.810667-1.237333 1.066667-2.645333 1.578666-3.968 0.341333-0.938667 0.853333-1.792 1.024-2.773333 0.085333-0.426667 0.042667-0.810667 0.085334-1.194667a18.432 18.432 0 0 0-2.005334-12.586667l-28.330666-48.981333 41.088-41.045333 49.450666 28.629333c2.986667 1.706667 6.229333 2.56 9.514667 2.56 3.626667 0 7.082667-1.28 10.112-3.242667 1.066667-0.426667 2.133333-0.256 3.114667-0.853333a265.429333 265.429333 0 0 1 78.293333-31.786667 18.218667 18.218667 0 0 0 5.717333-2.56 17.450667 17.450667 0 0 0 4.821334-4.437333 18.133333 18.133333 0 0 0 1.834666-2.773333c0.853333-1.365333 2.176-2.218667 2.645334-3.882667l14.677333-55.125333h58.026667l14.677333 54.613333c0.426667 1.706667 1.92 2.602667 2.688 4.053333 0.512 0.853333 1.066667 1.706667 1.706667 2.474667a17.066667 17.066667 0 0 0 5.205333 4.608 18.773333 18.773333 0 0 0 5.546667 2.474667c29.44 6.4 57.344 17.706667 82.901333 33.621333 0.554667 0.341333 1.28 0.213333 1.834667 0.512a19.072 19.072 0 0 0 10.026666 3.072 19.029333 19.029333 0 0 0 9.472-2.56l49.450667-28.586667 41.045333 40.96-28.288 49.066667a18.56 18.56 0 0 0-0.426666 17.408c0.469333 1.28 0.725333 2.688 1.493333 3.882667 15.232 24.192 26.325333 50.474667 32.981333 78.08 0.256 1.109333 1.28 1.706667 1.706667 2.688a18.773333 18.773333 0 0 0 13.098667 14.506666l50.048 14.506667v58.538667l-50.048 14.506666zM853.333333 493.098667c0-0.725333-0.341333-1.365333-0.426666-2.048a18.730667 18.730667 0 0 0-13.312-19.541334l-54.784-15.786666a295.978667 295.978667 0 0 0-30.421334-72.533334l30.549334-52.906666a18.730667 18.730667 0 0 0-4.266667-23.552c-0.426667-0.512-0.64-1.194667-1.152-1.706667l-56.96-56.917333c-0.554667-0.512-1.237333-0.768-1.834667-1.194667a18.773333 18.773333 0 0 0-23.509333-4.181333l-53.376 30.890666a301.013333 301.013333 0 0 0-75.093333-30.549333l-15.658667-58.325333a18.730667 18.730667 0 0 0-19.712-13.653334c-0.682667-0.085333-1.28-0.426667-2.005333-0.426666h-80.554667c-0.768 0-1.365333 0.341333-2.133333 0.426666a18.858667 18.858667 0 0 0-19.626667 13.696l-15.701333 58.922667a302.08 302.08 0 0 0-71.466667 29.269333l-53.589333-31.018666a18.858667 18.858667 0 0 0-23.552 4.181333c-0.554667 0.426667-1.28 0.64-1.792 1.194667L205.994667 304.256c-0.554667 0.512-0.725333 1.194667-1.194667 1.749333a18.688 18.688 0 0 0-4.224 23.552l30.506667 52.778667a295.338667 295.338667 0 0 0-30.976 73.386667l-58.069334 15.701333a18.773333 18.773333 0 0 0-13.653333 19.584c-0.042667 0.725333-0.384 1.365333-0.384 2.090667v80.469333c0 0.725333 0.341333 1.365333 0.426667 2.090667a18.773333 18.773333 0 0 0 13.610666 19.626666l58.026667 15.744c6.826667 25.002667 16.64 48.981333 29.696 71.552l-30.464 52.48a18.688 18.688 0 0 0 4.181333 23.466667c0.426667 0.597333 0.64 1.28 1.194667 1.834667l56.96 56.917333c0.853333 0.768 1.877333 1.152 2.816 1.792a18.602667 18.602667 0 0 0 13.013333 6.101333 18.773333 18.773333 0 0 0 9.472-2.517333l52.821334-30.421333c23.210667 13.44 47.786667 23.808 73.6 30.72l15.701333 58.922666c2.261333 8.533333 9.941333 14.122667 18.346667 14.122667 0.725333 0 1.408-0.213333 2.090666-0.298667 0.469333 0.042667 0.853333 0.298667 1.28 0.298667h80.597334c0.469333 0 0.853333-0.256 1.322666-0.298667 0.682667 0.085333 1.365333 0.298667 2.005334 0.298667a19.072 19.072 0 0 0 18.346666-14.08l15.701334-58.24a303.744 303.744 0 0 0 73.088-29.312l54.784 31.573333c2.986667 1.706667 6.229333 2.56 9.429333 2.56a18.773333 18.773333 0 0 0 13.098667-6.144c0.896-0.64 1.962667-0.981333 2.730666-1.834666l57.002667-56.874667c0.554667-0.554667 0.725333-1.194667 1.194667-1.706667a18.773333 18.773333 0 0 0 4.181333-23.637333l-30.933333-53.333333c13.781333-23.253333 24.32-47.957333 31.317333-73.898667l54.954667-15.914667a18.730667 18.730667 0 0 0 13.312-19.541333c0.085333-0.725333 0.426667-1.322667 0.426666-2.048v-80.469333z" p-id="7151"></path></svg>
                            <div class="mdui-list-item-content">
                                <center>后台</center>
                            </div>
                        </a>
                    </div>
                    <div class="mdui-list">
                        <a href="javascript:void(0)" onclick="go_about()" class="mdui-list-item">
                            <svg t="1583241557244" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6714" width="32" height="32"><path d="M872.746667 573.866667a18.858667 18.858667 0 0 0-22.058667 15.445333 322.901333 322.901333 0 0 1-318.464 266.368c-178.389333 0-323.498667-145.066667-323.498667-323.498667a323.413333 323.413333 0 0 1 591.701334-180.906666 319.829333 319.829333 0 0 1 50.261333 123.818666 19.072 19.072 0 0 0 37.461333-6.656A356.949333 356.949333 0 0 0 832 329.984 361.301333 361.301333 0 0 0 532.224 170.666667 361.429333 361.429333 0 0 0 170.666667 532.181333c0 199.381333 162.218667 361.557333 361.557333 361.557334a360.874667 360.874667 0 0 0 355.925333-297.770667 19.029333 19.029333 0 0 0-15.36-22.058667" p-id="6715"></path><path d="M532.224 411.306667a20.138667 20.138667 0 0 0-20.138667 20.181333v322.133333a20.138667 20.138667 0 0 0 40.277334 0v-322.133333a20.138667 20.138667 0 0 0-20.138667-20.181333M552.362667 310.613333a20.138667 20.138667 0 0 0-40.277334 0v40.277334a20.138667 20.138667 0 0 0 40.277334 0v-40.32z" p-id="6716"></path></svg>
                            <div class="mdui-list-item-content">
                                <center>关于</center>
                            </div>
                        </a>
                    </div>
                    
                </div>
                    
            </div>
        </div>
        <div class="beauty_mdui" id="pjax-change"><?php require_once('pages/index.php'); ?></div>
        <br><br><br>
        <div class="mdui-divider-dark"></div>
        <center><p id="hitokoto">:D 获取中...</p></center>
        <div class="Copyright"><p class="mdui-typo">Copyright © 2020 <a href="https://www.vultr.com/?ref=8754136">ebxcto</a>. All rights reserved.</p></div>
    </body>
    <script src="/static/jquery/dist/jquery.js"></script>
    <script src="/static/jquery-pjax/jquery.pjax.js"></script>
    <script src="/static/nprogress/nprogress.js"></script>
    <script>
        
        
            //禁止右键弹出菜单
        document.oncontextmenu = function()
        {
            return document.location.href="https://www.vultr.com/?ref=8799949-6G";
        }    
        
        document.onkeydown=function (e){
            var currKey=0,evt=e||window.event;
            currKey=evt.keyCode||evt.which||evt.charCode;
            if (currKey == 123) {
                window.event.cancelBubble = true;
                window.event.returnValue = false;
            }
        }

        $(document).on('pjax:start', function() { NProgress.start(); });
        $(document).on('pjax:end',   function() { NProgress.done();  });
        function go_index(){
            $.pjax({
                url : "/pages/index.php",
                container : "#pjax-change"
            })
        }
        function go_about(){
            $.pjax({
                url : "/pages/about.php",
                container : "#pjax-change"
            })
        }
        function go_back_domain(){
            $.pjax({
                url : "/pages/go_back_domain.php",
                container : "#pjax-change"
            })
        }
        function long_to_short(){
            $.pjax({
                url : "/pages/long_to_short.php",
                container : "#pjax-change"
            })
        }
        function go_admin(){
            $.pjax({
                url : "/admin/admin_auth.php",
                container : "#pjax-change"
            })
        }
    </script>
    
    <script>
      fetch('https://v1.hitokoto.cn')
        .then(response => response.json())
        .then(data => {
          const hitokoto = document.getElementById('hitokoto')
          hitokoto.href = 'https://hitokoto.cn/?uuid=' + data.uuid
          hitokoto.innerText = data.hitokoto
        })
        .catch(console.error)
</script>
</html>